﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using SquidConsult.DAL;
using System.Data;
using System.IO;


namespace SquidConsult.BLL
{
    public class PeopleBL
    {
        /// <summary>
        /// This class store common business logic for accountant, consulatant 
        /// and supervisor to inhirt
        /// </summary>
        private PeopleDS peopleDS = new PeopleDS();

        #region Get Expense
        public IQueryable GetExpense(Guid reportId)
        {
            return peopleDS.GetExpense(reportId);
        }

        public string GetReceiptPath(Guid expenseId)
        {
            return peopleDS.GetReceiptPath(expenseId);
        }
        #endregion 

        #region Get Department Budget
        public double GetDepartmentTotalExpense(string supervisorName)
        {
            return peopleDS.GetDepartmentTotalExpense(supervisorName);
        }

        public double GetRemainBuget(string supervisorName)
        {
            return peopleDS.GetDepartmentBudget(supervisorName) - peopleDS.GetDepartmentTotalExpense(supervisorName);
        }
        #endregion 
    }
}